<div class="tabbable tabs-left">
              <ul class="nav nav-tabs">
              	<li><h5><?php echo $this->translate('属性组信息'); ?></h5></li>
                <li class="active"><a data-toggle="tab" href="#user_a"><?php echo $this->translate('基本信息'); ?></a></li>
              </ul>
              <form class="form-horizontal" name="attribute_group_form" id="tag_group_form" method="post" action="">
              <input type="hidden" name="attribute_group_id" id="attribute_group_id" value="<?php if($this->group_info) echo $this->group_info['attribute_group_id']; else echo ''; ?>" />
              <div class="tab-content">
    			<div style="height:30px;border-bottom:4px solid #DFDFDF;">
        			<div class="pull-left" style="font-size:16px;line-height:30px;"><strong><?php if($this->group_info) echo $this->translate('编辑'); else echo $this->translate('新加'); ?><?php echo $this->translate('属性组'); ?></strong></div>
        			<div class="pull-right">
                	<a href="<?php echo $this->url('attributeetutor/default',array('action'=>'attributeGroup')); ?>" class="btn btn-small"><i class="icon-arrow-left"></i> <?php echo $this->translate('返回属性组列表'); ?></a>&nbsp;
                	<a href="<?php echo $this->serverUrl(true); ?>" class="btn btn-small btn-warning"><i class="icon-repeat icon-white"></i> <?php echo $this->translate('刷新'); ?></a>&nbsp;
                    <?php if($this->group_info) { ?>
                    <a href="javascript:;" onclick="return group_del_js(<?php echo $this->group_info['attribute_group_id']; ?>);" class="btn btn-small btn-danger"><i class="icon-remove icon-white"></i> <?php echo $this->translate('删除属性组'); ?></a>&nbsp;
                    <?php } ?>
                	<button type="submit" class="btn btn-small btn-primary"><i class="icon-ok icon-white"></i> <?php echo $this->translate('保存属性组信息'); ?></button>&nbsp;
                	<a href="<?php echo $this->myviewalias()->dbshopHelpUrl('goods_attribute_group_set'); ?>" target="_blank" class="btn btn-small btn-info"><i class="icon-info-sign icon-white"></i> <?php echo $this->translate('查看帮助说明'); ?></a>
                	</div>
        		</div>
                <div id="user_a" class="tab-pane active">
                	<div class="well admin_add_header_well"><?php echo $this->translate('基本信息'); ?></div>
                	<div class="well admin_add_well"> 
                    	<div class="control-group">
                  			<label for="input01" class="control-label"><?php echo $this->translate('属性组名称'); ?><span class="must_add_value">*</span>：</label>
           					<div class="controls">
              					<input type="text" id="attribute_group_name"  name="attribute_group_name" class="span6" value="<?php echo ($this->group_info ? $this->escapeHtml($this->group_info['attribute_group_name']) : ''); ?>">
            				</div>                        
                        </div>
                    	<div class="control-group">
                  			<label for="input01" class="control-label"><?php echo $this->translate('属性组排序'); ?>：</label>
           					<div class="controls">
              					<input type="text" id="attribute_group_sort"  name="attribute_group_sort" class="span1" value="<?php echo ($this->group_info ? $this->group_info['attribute_group_sort'] : '255'); ?>">
            				</div>                        
                        </div>                                                                                                                       
                  	</div>
                </div>
             </div>
              </form>
</div>
<script>
//属性分组保存验证
$(document).ready(function() {
	$("#tag_group_form").validate({
		rules: {
			attribute_group_name: {
				required: true,
				maxlength:30
			},
			attribute_group_sort: {
				number: true,
				min:1,
				max:255
			}
		},
		messages: {
			attribute_group_name: {
				required: "<?php echo $this->translate('请输入属性组名称！'); ?>",
				maxlength:"<?php echo $this->translate('属性组名称最长为30个汉字！'); ?>"
			},
			attribute_group_sort: {
				number: "<?php echo $this->translate('属性组排序必须为数字'); ?>",
				min:"<?php echo $this->translate('属性组排序最小为1'); ?>",
				max:"<?php echo $this->translate('属性组排序最大为255'); ?>"
			}
		}
	});
});
//属性组删除js
function group_del_js(group_id) {
	if(window.confirm('<?php echo $this->translate('您确实要删除该属性组吗？'); ?>')) {
	$.post("<?php echo $this->url('attributeetutor/default',array('action'=>'delAttributeGroup')); ?>",{attribute_group_id:group_id},
	function(data){
		if(data != 'false') {
			window.location.href='<?php echo $this->url('attributeetutor/default',array('action'=>'attributeGroup')); ?>';
			return true;
		} else {
			alert('<?php echo $this->translate('属性组删除失败，属性组下存在属性！'); ?>');
		}
	});
	}
	return false;
}
</script>